//
//  WYWRemotePlayer.h
//  WYWPlayer
//
//  Created by Mr.Run on 2017/11/9.
//  Copyright © 2017年 Mr.Run. All rights reserved.
//

//#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

typedef NS_ENUM(NSUInteger, WYWRemotePlayerState) {
    WYWRemotePlayerStateUnknown = 0,
    WYWRemotePlayerStateLoading = 1,
    WYWRemotePlayerStatePlaying = 2,
    WYWRemotePlayerStateStopped = 3,
    WYWRemotePlayerStatePause = 4,
    WYWRemotePlayerStateFailed = 5,
};

@interface WYWRemotePlayer : NSObject

+(instancetype)sharedInstance;

-(void)playWithURL:(NSURL *)url isCache:(BOOL)isCache;

-(void)pause;

-(void)resume;

-(void)stop;

-(void)seekWithTimeDiffer:(NSTimeInterval)timeDiffer;

-(void)seekWithProgress:(CGFloat)progress;

//-(void)setRate:(CGFloat)rate;

//-(void)setMuted:(BOOL)muted;

//-(void)setVolume:(CGFloat)volume;

@property (nonatomic,assign) CGFloat rate;
@property (nonatomic,assign) CGFloat volume;
@property (nonatomic,assign) BOOL muted;
@property (nonatomic,readonly,assign) WYWRemotePlayerState state;

@property (nonatomic,readonly,assign) NSTimeInterval totalTime;
@property (nonatomic,readonly,copy) NSString *totalTimeFormat;
@property (nonatomic,readonly,assign) NSTimeInterval currentTime;
@property (nonatomic,readonly,copy) NSString *currentTimeFormat;
@property (nonatomic,readonly,assign) CGFloat progress;
@property (nonatomic,readonly,assign) CGFloat loadDataProgress;
@property (nonatomic,readonly,strong) NSURL *url;

@end
